from flask import Flask
from flask_mongoengine import MongoEngine
from flask_sockets import Sockets
import flask_login

app = Flask(__name__)
app.secret_key = 'mleaf secret key'  # Change this!
app.config['MONGODB_SETTINGS'] = {
    'db': 'mleaf',
    'host': '127.0.0.1',
    'port': 27017
}
login_manager = flask_login.LoginManager()

db = MongoEngine(app)
sockets = Sockets(app)
login_manager.init_app(app)
